let baseUrl  = 'http://localhost:3000';
let webUrl = 'https://0e36-182-88-172-147.ngrok-free.app'


export const http = ({url,data,method='GET'})=>{
    return new Promise((resolve,reject)=>{
        wx.request({
            url: baseUrl+url, 
            data,
            header: {
              'content-type': 'application/json',
              'ngrok-skip-browser-warning':123
            },
            success (res) {
                resolve(res.data);
            },
            fail(res){
                reject(res.data);
            }
          })
    })
}